package com.chub.study.modules.dto;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author : chub
 * @version : V1.0.0
 * @fileName : DateReq.java
 * @description : TODO
 * @createTime : 2024-07-31 16:21
 */
@Data
public class DateResp {

    private String strDate;

    // @JsonFormat 可将后端传入的“java.sql.Date的日期，以字符串“yyyy-MM-dd”格式传给前端
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATE_PATTERN, timezone = "GMT+8")
    private java.util.Date utilDate;

    private java.sql.Date sqlDate;

    private java.sql.Timestamp sqlTimestamp;

    private LocalDate localDate;

    private LocalDateTime localDateTime;

}
